package com.imooc.bilibili.entity;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 视频信息表(VideoInfo)实体类
 *
 * @author makejava
 * @since 2023-04-28 23:42:32
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@ToString
@EqualsAndHashCode
@Document(indexName = "videos")
public class VideoInfo implements Serializable {
    private static final long serialVersionUID = 837696632204424420L;
    /**
     * 视频id
     */
    @Id
    private Long videoId;
    /**
     * 用户id
     */
    @Field(type = FieldType.Long)
    private Long userId;
    /**
     * 视频存储路径
     */
    private String videoUrl;
    /**
     * 视频封面存储路径
     */
    private String videoThumbnail;
    /**
     * 视频标题
     */
    @Field(type = FieldType.Text)
    private String videoTitle;
    /**
     * 视频类型，0为原创，1为转载
     */
    private Integer videoType;
    /**
     * 视频时长
     */
    private String videoDuration;
    /**
     * 所在分区
     */
    private String videoArea;
    /**
     * 视频简介
     */
    @Field(type = FieldType.Text)
    private String videoDescription;
    /**
     * 启用状态，0启用，1禁用
     */
    private Integer enableState;
    /**
     * 删除状态，0未删除，1已删除
     */
    private Integer deleteState;
    /**
     * 创建时间
     */
    @Field(type = FieldType.Date)
    private Date createTime;
    /**
     * 更新时间
     */
    @Field(type = FieldType.Date)
    private Date updateTime;

    /**
     * 标签列表
     */
    private List<VideoTagRealtion> videoTageList;

}

